package com.nfdw.project.enums;

public enum FditemsEnum {

    CTNY("01","传统能源交易"),
    LD("02","绿电交易"),
    XNY("03","新能源交易"),
    ZJ("99","市场交易总计");

    private String code;
    private String name;

    FditemsEnum(String code,String name){
        this.code=code;
        this.name=name;
    }

    public static String getNameByCode(String code){
        for (FditemsEnum fditemsEnum : FditemsEnum.values()) {
            if (fditemsEnum.getCode().equals(code)){
                return fditemsEnum.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
